package com.zjtaixue.usersite.mapper;

import com.zjtaixue.usersite.domain.Major;
import com.zjtaixue.usersite.query.MajorQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MajorMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Major record);

    Major selectByPrimaryKey(Integer id);

    List<Major> selectAll();

    int updateByPrimaryKey(Major record);

    int queryCount(MajorQueryObject qo);

    List<Major> query(MajorQueryObject qo);

    List<Major> getByName(String name);

    int countByName(String name);

    int countByMajorNameAndCollegeId(@Param("majorName") String majorName, @Param("collegeId") Integer collegeId);

    Major selectByMajorNameAndCollegeId(@Param("majorName") String majorName, @Param("collegeId") Integer collegeId);

    List<Major>listByCollegeId(Integer collegeId);
}